package cn.stylefeng.guns.modular.cb.util;

public class AEStest {
    public static void main(String[] args) {
        String encryptedData="iuWWuvpmyTDHU1JP8PXErmdXHvashMSsI6Z2TLDj2J3xfK5WCamM+39u48pqYLBqOUnGogWNXJLE/74IZDTL2k2tCVWvyvj+zepGi89z7Qv815IA4ipIxFhMC8gpg3YvzdpDVolmiWzrQki95bzLO98StEfEBUmN79kALfik0kEUEwmxFgCyoIQVjuzmbOv2fMsmNjrqTK0KGBg0TkoCAQ==";
        String iv="EpYTxDzngilRZC86vhJU3g==";
        String appId="wx29cacb46d1cd1e76";
        String sessionKey = "dzNItx/mDwB07T7/ykXjVg==";
        AESForWeixinGetPhoneNumber aes=new AESForWeixinGetPhoneNumber(encryptedData,sessionKey,iv);
        WeixinPhoneDecryptInfo info=aes.decrypt();
        if (null==info){
            System.out.println("error");
        }else {
            if (!info.getWeixinWaterMark().getAppid().equals(appId)){
                System.out.println("wrong appId");
            }
            System.out.println(info.toString());
        }
    }
}
